package io.renren.modules.sys.service.impl;

import io.renren.modules.sys.entity.OnshelvesitemVOEntity;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.sys.dao.OnshelvesitemDao;
import io.renren.modules.sys.entity.OnshelvesitemEntity;
import io.renren.modules.sys.service.OnshelvesitemService;


@Service("onshelvesitemService")
public class OnshelvesitemServiceImpl extends ServiceImpl<OnshelvesitemDao, OnshelvesitemEntity> implements OnshelvesitemService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<OnshelvesitemEntity> page = this.page(
                new Query<OnshelvesitemEntity>().getPage(params),
                new QueryWrapper<OnshelvesitemEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<OnshelvesitemVOEntity> getByShelvesId(Integer shelvesId){
        List<OnshelvesitemVOEntity> list = baseMapper.getByShelvesId(shelvesId);

        return list;
    }

}
